﻿using System;
using System.Xml;
using Genko.Model.Integration.Xml;

namespace Genko.Model.Integration
{
	public class XmlAdapterFactory
	{
		private XmlAdapterFactory()
		{ }

		public static IMemberAdapter CreateAdapter(XmlDocument xmlDoc)
		{
			return new XmlMemberAdapter(xmlDoc);
		}

		public static IMemberAdapter CreateAdapter(string xml)
		{
			XmlDocument xmlDoc = new XmlDocument();
			xmlDoc.LoadXml(xml);
			return CreateAdapter(xmlDoc);
		}
	}
}
